package mx.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import mx.dao.DepartmentDao;
import mx.entity.Department;
import mx.service.DepartmentService;

@Service
@Transactional
public class DepartmentServiceImpl implements DepartmentService {
	@Resource
	private DepartmentDao departmentDao;

	public List<Department> list(Map<String, Object> map) {

		return departmentDao.list(map);
	}

	public Long getTotal(Map<String, Object> map) {

		return departmentDao.getTotal(map);
	}

	public Integer update(Department department) {

		return departmentDao.update(department);
	}

	public Department find(Department department) {

		return departmentDao.find(department);
	}

	public Integer delete(Integer id) {

		return departmentDao.delete(id);
	}

	public Integer add(Department department) {

		return departmentDao.add(department);
	}

	public Department findById(Integer id) {
		return departmentDao.findById(id);
	}


}
